package com.ruoyi.common.core.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购订单对象 tb_procured_orders
 * 
 * @author ruoyi
 * @date 2023-11-15
 */
@Data
//@EqualsAndHashCode(callSuper = false)
public class ProcuredOrders extends TreeEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 采购订单id
     */
    private Long ordersId;

    /**
     * 计划单号
     */
    @Excel(name = "计划单号")
    private String ordersNumber;

    /**
     * 计划单号数组搜索(只用于在销售计划处提前结束按钮跳转到采购单页面参数查询)
     */
    @Excel(name = "计划单号")
    private List<String> ordersNumberList;

    /**
     * 关联采购计划表(tb_procured_plan)
     */
    @Excel(name = "关联采购计划表(tb_procured_plan)")
    private Long planId;

    /**
     * 供应商id
     */
    @Excel(name = "供应商id")
    private Integer vendorId;

    /**
     * 快递单号
     */
    @Excel(name = "快递单号")
    private String expressNumber;

    /**
     * 采购批次号
     */
    @Excel(name = "采购批次号")
    private String purchaseBatchNumber;

    /**
     * 预约到货时间
     */
    private Date arriveDate;

    /**
     * 快递备注
     */
    private String expressRemark;

    /**
     * 总件数
     */
    @Excel(name = "总件数")
    private Long total;

    /**
     * 核准人
     */
    @Excel(name = "核准人")
    private String approver;

    /**
     * 核准日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "核准日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvedTime;

    /**
     * 应付金额
     */
    @Excel(name = "应付金额")
    private BigDecimal amountDue;

    /**
     * 原始金额
     */
    @Excel(name = "原始金额")
    private BigDecimal originalAmount;

    /**
     * 入库状态
     */
    @Excel(name = "入库状态")
    private String inboundStatus;

    /**
     * 入库总数量
     */
    @Excel(name = "入库总数量")
    private Long inboundNumber;

    /**
     * 付款状态
     */
    @Excel(name = "付款状态")
    private String paymentStatus;

    /**
     * 退款状态
     */
    @Excel(name = "退款状态")
    private String returnStatus;

    /**
     * 删除状态 0存在1删除
     */
    private String deleteStatus;

    /**
     * 订单状态：0正常，1已完结，2仅退款中，3退货退款中，4换货中，5仅退款已驳回，6退货退款已驳回，7换货已驳回，8未完结
     */
    private String status;

    /**
     * 添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date addTime;

    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /**
     * 汇率
     */
    @Excel(name = "汇率")
    private BigDecimal currency;

    /**
     * 运费
     */
    @Excel(name = "运费")
    private BigDecimal freight;

    /**
     * 采购计划号
     */
    private String planNumber;

    /**
     * 寄往的仓库
     */
    private String companyName;

    /**
     * 下单人和下单日期
     */
    private String planApprover;
    private Date planApprovedTime;

    /**
     * 采购人名称
     */
    private String userName;

    /**
     * 采购订单商品信息
     */
    private List<OrdersProduct> ordersProductList;
    /**
     * 采购日期
     */
    private Date planDate;

    /**
     * 关联机构管理表(tb_company)
     */
    private Long companyId;

    /**
     * 运费是否由供应商付
     */
    private Integer isSupplierPaysFreight;

    /**
     * 1688订单号
     */
    private String orderNo1688;

    /**
     * 样式
     */
    private String styleClass;
    /**
     * 未处理的申请驳回记录
     */
    private Integer solveCount;

    private String deptName;

    private Long warehouseId;

    private Long monetaryId;

    private String contract;

    private String name;

    private String monetaryName;

    private Long notifiedCount;

    //标识是否还可以进行收货
    private Long allWaitingStockZero;

    //用于标记是否是批量收货时查询的采购订单
    private Long unreceivedOrdersFlag;

    //撤回备注
    private String revokeRemark;

    //----------采购订单页面搜索需要接收的参数变量开始-----------
    private String searchType;
    private String searchContent;
    private String searchInboundStatus;
    //----------采购订单页面搜索需要接收的参数变量结束-----------

    private Integer receiptNoOrderStatus; // 收货单页面查询非结束订单

}
